// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdAlertRecipient
 */
public class AdAlertRecipientDaoImpl
    extends org.tinaelle.server.domain.AdAlertRecipientDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdAlertRecipientDao#toAdAlertRecipientDTO(org.tinaelle.server.domain.AdAlertRecipient)
     */
    public org.tinaelle.common.dto.AdAlertRecipientDTO toAdAlertRecipientDTO(final org.tinaelle.server.domain.AdAlertRecipient entity)
    {
        return super.toAdAlertRecipientDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdAlertRecipient loadAdAlertRecipientFromAdAlertRecipientDTO(org.tinaelle.common.dto.AdAlertRecipientDTO adAlertRecipientDTO)
    {
        org.tinaelle.server.domain.AdAlertRecipient adAlertRecipient = this.load(adAlertRecipientDTO.getAdAlertRecipientId());
        if (adAlertRecipient == null)
        {
            adAlertRecipient = org.tinaelle.server.domain.AdAlertRecipient.Factory.newInstance();
        }
        return adAlertRecipient;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdAlertRecipientDao#adAlertRecipientDTOToEntity(org.tinaelle.common.dto.AdAlertRecipientDTO)
     */
    public org.tinaelle.server.domain.AdAlertRecipient adAlertRecipientDTOToEntity(org.tinaelle.common.dto.AdAlertRecipientDTO adAlertRecipientDTO)
    {
        org.tinaelle.server.domain.AdAlertRecipient entity = this.loadAdAlertRecipientFromAdAlertRecipientDTO(adAlertRecipientDTO);
        this.adAlertRecipientDTOToEntity(adAlertRecipientDTO, entity, true);
        return entity;
    }
}